<%--
  Created by IntelliJ IDEA.
  User: dj
  Date: 2018-12-13
  Time: 7:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>多重耐药处置单列表</title>

    <%@ include file="/common/baseMeta.jsp" %>

    <link href="/static/js/layui/css/layui.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="/static/js/dlcommon.js"></script>
    <script type="text/javascript" src="/static/js/layui/layui.all.js"></script>
    <script type="text/javascript" src="/static/js/common.js"></script>

    <script type="text/javascript">
        var uid = "${sysStaffEntity.uid}";//唯一标识
        var lname = "${sysStaffEntity.lname}"; //登录工号
        $(function () {
            $("#l_datagrid").height(findDimensions_height() - 50);
            //初始化日期控件
            var date = $.getdate.getPresentDate();
            var now = new Date();
            now.addDays(-15);//加减日期操作
            $('#sdate').val(now.format("yyyy-MM-dd"));
            $('#edate').val(date);
            $.getJSON("/commapiV2", {p_dm: "sys_ks_Getzy", userid: lname}, function (data) {
                if (data.success) {
                    $('#ks').combobox({
                        data: data.Table,
                        valueField: 'code',
                        textField: 'name'
                    });
                }
            }, true);
            //初始化表头
            initGrid();
            LoadGrid();
        })
        function initGrid() {
            $('#l_datagrid').datagrid({
                rownumbers: true,//显示行号
                singleSelect: true,//只显示一行
                fitColumns: true,
                sortable: true, //启用排序列
                collapsible: true,
                idField: 'ID',
                columns: [
                    [

                        {field: 'KSNAME', title: '科室名称', width: '120px', align: 'center'},
                        {field: 'YSNAME', title: '医生姓名', width: '80px', align: 'center'},
                        {field: 'HZXM', title: '患者姓名', width: '80px', align: 'center'},
                        {field: 'ZYH', title: '住院号', width: '80px', align: 'center'},
                        {field: 'SJRQ', title: '送检日期', width: '120px', align: 'center'},
                        {field: 'BBMC', title: '标本名称', width: '120px', align: 'center'},
                        {field: 'DCNYMC', title: '多重耐药名称', width: '150px', align: 'center'},
                        {field: 'Fsrq', title: '发送日期', width: '130px', align: 'center'},
                        {field: 'GLZL', title: '隔离种类', width: '130px', align: 'center'},
                        {field: 'GLBS', title: '隔离标识三统一', width: '130px', align: 'center'},
                        {field: 'GLFJ', title: '隔离房间种类', width: '120px', align: 'center'},
                        {field: 'BHCS', title: '隔离防护措施', width: '120px', align: 'center'},
                        {field: 'JCSJ', title: '解除隔离时间', width: '90px', align: 'center'},
                        {field: 'TXR', title: '填写人', width: '80px', align: 'center'},
                        {field: 'TXRQ', title: '填写日期', width: '90px', align: 'center'},
                        {field: 'KSCODE', title: '科室代码', hidden: true},
                        {field: 'ID', hidden: true}
                    ]
                ]
            });
        }
        function LoadGrid() {
            //初始化数据
            $.getJSON("/commapiV2", {
                p_dm: "TDcny_CZD_Get_list",
                Ksinfo: $('#ks').combobox('getValue')+"#",
                Sdate: $('#sdate').val(),
                Edate: $('#edate').val(),
                zt:$('#zt').combobox('getValue')
            }, function (data) {
                if (data.success) {
                    var griddata = {};
                    griddata.rows = data.Table;
                    griddata.total = data.totalcount;
                    $('#l_datagrid').datagrid('loadData', griddata);
                }
            }, true);
        }
        function EditeCzb() {
            var row = $('#l_datagrid').datagrid('getSelected');
            var url = "/FormApi?mobanId=87465567-a28c-4403-8926-d339486c7cbc&dataId=" + row.ID;
            layeropen(800, 500, "填写打印处置表", url);
        }
    </script>
</head>
<body>
<div class="navheader form-inline" style="height:40px;margin-bottom: 0px;">
    <div class=" form-group">
        <label for="CYRQStart" style="padding:5px 10px 0 20px;">发送日期</label>

        <input type="text" class="form-control Wdate" style="width:100px;" name="sdate" id="sdate"
               placeholder=""
               value="${CYRQStart}"
               onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"/>
        <label for="CYRQEnd" style="padding:5px 10px 0 10px;">至</label>
        <input type="text" class="form-control Wdate" style="width:100px;" name="edate" id="edate"
               placeholder=""
               value="${CYRQEnd}"
               onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"/>
        <label for="ZYNumber" style="padding:5px 10px 0 20px;">送检科室</label>
        <select id="ks" class="easyui-combobox" style="height: 25px; width: 160px;">
        </select>
        <label for="ZYNumber" style="padding:5px 10px 0 20px;">数据状态</label>
        <select id="zt" class="easyui-combobox" style="height: 25px; width: 160px;">
            <option value='已填写'>已填写</option>
            <option value='未填写' selected="selected">未填写</option>
        </select>
        <button type="button" class="btn btn-success bi-btn-search" onclick="LoadGrid()">
            <span class="glyphicon glyphicon glyphicon-search"></span>
        </button>
        <div class="btn-group-right">
            <div class="btn-group" role="group">
                <button type="button" class="btn layui-btn-warm bi-btn-width90" onclick="EditeCzb()">填写处置表</button>
            </div>
        </div>
    </div>
</div>
<div style="width:100%;float:left;display:inline-block;padding-top:10px;">
    <table id="l_datagrid" class="datagrid" style="width:100%"></table>
</div>
</body>
</html>
